.class public abstract Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;
.super Lcom/google/android/maps/Overlay;
.source "AbstractGroupableOverlay.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;,
        Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;,
        Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$OnFocusChangeListener;
    }
.end annotation


# static fields
#the value of this static final field might be set in the static constructor
.field private static final MINIMUM_TOUCH_DIAMETER:I = 0x0

.field private static final PRESSED_STATE_SET:[I = null

.field private static final TAG:Ljava/lang/String; = "AbstractGroupableOverlay"


# instance fields
.field private MSG_ZOOM_BEGIN:I

.field private MSG_ZOOM_END:I

.field private cachedMap:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Landroid/graphics/drawable/Drawable;",
            ">;"
        }
    .end annotation
.end field

.field private isZoomChanging:Z

.field private mContext:Landroid/content/Context;

.field private mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

.field private mHandler:Landroid/os/Handler;

.field private mItemList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation
.end field

.field private mProjection:Lcom/google/android/maps/Projection;

.field private final mTempPoint:Landroid/graphics/Point;

.field private final mTempPoint1:Landroid/graphics/Point;

.field private final mTouchableBounds:Landroid/graphics/Rect;

.field protected pHandler:Landroid/os/Handler;

.field private zoomLevel:I


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 40
    invoke-static {}, Landroid/view/ViewConfiguration;->getTouchSlop()I

    move-result v0

    mul-int/lit8 v0, v0, 0x4

    sput v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MINIMUM_TOUCH_DIAMETER:I

    .line 136
    const/4 v0, 0x1

    new-array v0, v0, [I

    const/4 v1, 0x0

    const v2, 0x10100a7

    aput v2, v0, v1

    sput-object v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->PRESSED_STATE_SET:[I

    return-void
.end method

.method public constructor <init>()V
    .locals 4

    .prologue
    const/4 v3, 0x1

    .line 74
    invoke-direct {p0}, Lcom/google/android/maps/Overlay;-><init>()V

    .line 39
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTouchableBounds:Landroid/graphics/Rect;

    .line 42
    new-instance v1, Landroid/graphics/Point;

    invoke-direct {v1}, Landroid/graphics/Point;-><init>()V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    .line 43
    new-instance v1, Landroid/graphics/Point;

    invoke-direct {v1}, Landroid/graphics/Point;-><init>()V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint1:Landroid/graphics/Point;

    .line 47
    new-instance v1, Ljava/util/ArrayList;

    const/16 v2, 0x1e

    invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    .line 48
    new-instance v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;-><init>(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$1;)V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    .line 50
    iput-boolean v3, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->isZoomChanging:Z

    .line 52
    iput v3, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_BEGIN:I

    .line 53
    const/4 v1, 0x0

    iput v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_END:I

    .line 56
    new-instance v1, Ljava/util/WeakHashMap;

    invoke-direct {v1}, Ljava/util/WeakHashMap;-><init>()V

    invoke-static {v1}, Ljava/util/Collections;->synchronizedMap(Ljava/util/Map;)Ljava/util/Map;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->cachedMap:Ljava/util/Map;

    .line 59
    new-instance v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$1;

    invoke-direct {v1, p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$1;-><init>(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mHandler:Landroid/os/Handler;

    .line 223
    const/4 v1, -0x1

    iput v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->zoomLevel:I

    .line 75
    new-instance v0, Landroid/os/HandlerThread;

    const-string v1, "AbstractGroupableOverlay"

    invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    .line 76
    .local v0, htreadd:Landroid/os/HandlerThread;
    invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V

    .line 77
    new-instance v1, Landroid/os/Handler;

    invoke-virtual {v0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->pHandler:Landroid/os/Handler;

    .line 78
    return-void
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_BEGIN:I

    return v0
.end method

.method static synthetic access$202(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 37
    iput-boolean p1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->isZoomChanging:Z

    return p1
.end method

.method static synthetic access$300(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_END:I

    return v0
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)Landroid/graphics/Point;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    return-object v0
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)Lcom/google/android/maps/Projection;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mProjection:Lcom/google/android/maps/Projection;

    return-object v0
.end method

.method static synthetic access$600(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)Landroid/graphics/Point;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint1:Landroid/graphics/Point;

    return-object v0
.end method

.method static synthetic access$700(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;)Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    return-object v0
.end method

.method private checkItemAtLocation(IILcom/google/android/maps/MapView;)Ljava/util/ArrayList;
    .locals 8
    .parameter "hitX"
    .parameter "hitY"
    .parameter "mapView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II",
            "Lcom/google/android/maps/MapView;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;",
            ">;"
        }
    .end annotation

    .prologue
    .line 189
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 190
    .local v1, gmList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;>;"
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    invoke-virtual {v5}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->getGroupMapItems()Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v5}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 191
    .local v0, gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {p3}, Lcom/google/android/maps/MapView;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v5

    invoke-virtual {v0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getPoint()Lcom/google/android/maps/GeoPoint;

    move-result-object v6

    iget-object v7, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    invoke-interface {v5, v6, v7}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 192
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v5, v5, Landroid/graphics/Point;->x:I

    sub-int v3, p1, v5

    .line 193
    .local v3, offsetX:I
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v5, v5, Landroid/graphics/Point;->y:I

    sub-int v4, p2, v5

    .line 194
    .local v4, offsetY:I
    invoke-virtual {p0, v0, v3, v4}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->hitTest(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;II)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 195
    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 198
    .end local v0           #gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v3           #offsetX:I
    .end local v4           #offsetY:I
    :cond_1
    return-object v1
.end method

.method private getItemAtLocation(IILcom/google/android/maps/MapView;)Ljava/util/ArrayList;
    .locals 8
    .parameter "hitX"
    .parameter "hitY"
    .parameter "mapView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II",
            "Lcom/google/android/maps/MapView;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 174
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 175
    .local v0, footprintList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    invoke-virtual {v5}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->getGroupMapItems()Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v5}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 176
    .local v1, gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {p3}, Lcom/google/android/maps/MapView;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v5

    invoke-virtual {v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getPoint()Lcom/google/android/maps/GeoPoint;

    move-result-object v6

    iget-object v7, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    invoke-interface {v5, v6, v7}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 177
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v5, v5, Landroid/graphics/Point;->x:I

    sub-int v3, p1, v5

    .line 178
    .local v3, offsetX:I
    iget-object v5, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v5, v5, Landroid/graphics/Point;->y:I

    sub-int v4, p2, v5

    .line 179
    .local v4, offsetY:I
    invoke-virtual {p0, v1, v3, v4}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->hitTest(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;II)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 180
    invoke-virtual {v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getFootprints()Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v0, v5}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    goto :goto_0

    .line 183
    .end local v1           #gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v3           #offsetX:I
    .end local v4           #offsetY:I
    :cond_1
    return-object v0
.end method

.method private getTouchableBounds(Landroid/graphics/Rect;)Landroid/graphics/Rect;
    .locals 11
    .parameter "bounds"

    .prologue
    .line 98
    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v7

    .line 99
    .local v7, w:I
    invoke-virtual {p1}, Landroid/graphics/Rect;->height()I

    move-result v2

    .line 100
    .local v2, h:I
    sget v8, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MINIMUM_TOUCH_DIAMETER:I

    if-lt v7, v8, :cond_0

    sget v8, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MINIMUM_TOUCH_DIAMETER:I

    if-lt v2, v8, :cond_0

    move-object v8, p1

    .line 111
    :goto_0
    return-object v8

    .line 103
    :cond_0
    invoke-virtual {p1}, Landroid/graphics/Rect;->centerX()I

    move-result v0

    .line 104
    .local v0, cx:I
    invoke-virtual {p1}, Landroid/graphics/Rect;->centerY()I

    move-result v1

    .line 105
    .local v1, cy:I
    sget v8, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MINIMUM_TOUCH_DIAMETER:I

    invoke-static {v8, v7}, Ljava/lang/Math;->max(II)I

    move-result v6

    .line 106
    .local v6, touchW:I
    div-int/lit8 v8, v6, 0x2

    sub-int v4, v0, v8

    .line 107
    .local v4, touchL:I
    sget v8, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MINIMUM_TOUCH_DIAMETER:I

    invoke-static {v8, v2}, Ljava/lang/Math;->max(II)I

    move-result v3

    .line 108
    .local v3, touchH:I
    div-int/lit8 v8, v3, 0x2

    sub-int v5, v1, v8

    .line 109
    .local v5, touchT:I
    iget-object v8, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTouchableBounds:Landroid/graphics/Rect;

    add-int v9, v4, v6

    add-int v10, v5, v3

    invoke-virtual {v8, v4, v5, v9, v10}, Landroid/graphics/Rect;->set(IIII)V

    .line 111
    iget-object v8, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTouchableBounds:Landroid/graphics/Rect;

    goto :goto_0
.end method


# virtual methods
.method public changeZoom()V
    .locals 4

    .prologue
    .line 92
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mHandler:Landroid/os/Handler;

    iget v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_END:I

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 93
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->isZoomChanging:Z

    .line 94
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mHandler:Landroid/os/Handler;

    iget v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->MSG_ZOOM_END:I

    const-wide/16 v2, 0x2bc

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 95
    return-void
.end method

.method protected abstract createItem(I)Lcom/htc/android/footprints/vo/Footprint;
.end method

.method public draw(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Z)V
    .locals 21
    .parameter "canvas"
    .parameter "mapview"
    .parameter "flag"

    .prologue
    .line 226
    invoke-super/range {p0 .. p3}, Lcom/google/android/maps/Overlay;->draw(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Z)V

    .line 227
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mContext:Landroid/content/Context;

    move-object/from16 v17, v0

    if-nez v17, :cond_0

    .line 228
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getContext()Landroid/content/Context;

    move-result-object v17

    move-object/from16 v0, v17

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mContext:Landroid/content/Context;

    .line 231
    :cond_0
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v17

    move-object/from16 v0, v17

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mProjection:Lcom/google/android/maps/Projection;

    .line 233
    move-object/from16 v0, p0

    iget v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->zoomLevel:I

    move/from16 v17, v0

    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getZoomLevel()I

    move-result v18

    move/from16 v0, v17

    move/from16 v1, v18

    if-eq v0, v1, :cond_2

    .line 234
    invoke-static {}, Ldalvik/system/VMRuntime;->getRuntime()Ldalvik/system/VMRuntime;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ldalvik/system/VMRuntime;->getExternalBytesAllocated()J

    move-result-wide v17

    move-wide/from16 v0, v17

    long-to-double v0, v0

    move-wide/from16 v17, v0

    const-wide v19, 0x415e848000000000L

    cmpl-double v17, v17, v19

    if-lez v17, :cond_1

    .line 235
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 238
    :cond_1
    invoke-virtual/range {p0 .. p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->changeZoom()V

    .line 240
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getZoomLevel()I

    move-result v17

    move/from16 v0, v17

    move-object/from16 v1, p0

    iput v0, v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->zoomLevel:I

    .line 244
    :cond_2
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->isZoomChanging:Z

    move/from16 v17, v0

    if-eqz v17, :cond_8

    .line 245
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->mGroupList:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->size()I

    move-result v15

    .line 246
    .local v15, oldCount:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->clear()V

    .line 248
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v8

    .local v8, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-eqz v17, :cond_3

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/htc/android/footprints/vo/Footprint;

    .line 249
    .local v6, f:Lcom/htc/android/footprints/vo/Footprint;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    move-object v1, v6

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->putItem(Lcom/htc/android/footprints/vo/Footprint;)V

    goto :goto_0

    .line 252
    .end local v6           #f:Lcom/htc/android/footprints/vo/Footprint;
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->mGroupList:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v8

    :goto_1
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-eqz v17, :cond_8

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 254
    .local v7, gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {v7}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->isGroup()Z

    move-result v17

    if-eqz v17, :cond_4

    .line 255
    new-instance v12, Lcom/htc/android/footprints/commonui/TBarGroupDrawable;

    invoke-direct {v12}, Lcom/htc/android/footprints/commonui/TBarGroupDrawable;-><init>()V

    .line 256
    .local v12, marker:Landroid/graphics/drawable/Drawable;
    invoke-static {v12}, Lcom/htc/android/footprints/utils/FootprintUtils;->boundCenterBottom(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;

    .line 257
    invoke-virtual {v7, v12}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->setMarker(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    .line 260
    .end local v12           #marker:Landroid/graphics/drawable/Drawable;
    :cond_4
    const/4 v9, 0x0

    .line 261
    .local v9, icon:Landroid/graphics/drawable/Drawable;
    :try_start_0
    invoke-virtual {v7}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getFootprints()Ljava/util/ArrayList;

    move-result-object v17

    const/16 v18, 0x0

    invoke-virtual/range {v17 .. v18}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/htc/android/footprints/vo/Footprint;

    .line 262
    .restart local v6       #f:Lcom/htc/android/footprints/vo/Footprint;
    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v17, v0

    if-eqz v17, :cond_6

    new-instance v17, Ljava/io/File;

    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v18, v0

    invoke-direct/range {v17 .. v18}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual/range {v17 .. v17}, Ljava/io/File;->exists()Z

    move-result v17

    if-eqz v17, :cond_6

    .line 263
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->cachedMap:Ljava/util/Map;

    move-object/from16 v17, v0

    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v18, v0

    invoke-interface/range {v17 .. v18}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    move-object v0, v10

    check-cast v0, Landroid/graphics/drawable/Drawable;

    move-object v9, v0

    .line 266
    if-nez v9, :cond_6

    .line 267
    new-instance v16, Landroid/graphics/BitmapFactory$Options;

    invoke-direct/range {v16 .. v16}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 268
    .local v16, opt:Landroid/graphics/BitmapFactory$Options;
    const/16 v17, 0xc

    move/from16 v0, v17

    move-object/from16 v1, v16

    iput v0, v1, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 269
    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    move-object/from16 v1, v16

    invoke-static {v0, v1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v14

    .line 271
    .local v14, old:Landroid/graphics/Bitmap;
    if-eqz v14, :cond_5

    .line 272
    const/16 v17, 0x20

    const/16 v18, 0x20

    const/16 v19, 0x0

    move-object v0, v14

    move/from16 v1, v17

    move/from16 v2, v18

    move/from16 v3, v19

    invoke-static {v0, v1, v2, v3}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v13

    .line 274
    .local v13, newBmp:Landroid/graphics/Bitmap;
    invoke-virtual {v14}, Landroid/graphics/Bitmap;->recycle()V

    .line 275
    new-instance v10, Lcom/htc/android/footprints/commonui/TBarDrawable;

    new-instance v17, Landroid/graphics/drawable/BitmapDrawable;

    move-object/from16 v0, v17

    move-object v1, v13

    invoke-direct {v0, v1}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    const/16 v18, 0x1

    move-object v0, v10

    move-object/from16 v1, v17

    move/from16 v2, v18

    invoke-direct {v0, v1, v2}, Lcom/htc/android/footprints/commonui/TBarDrawable;-><init>(Landroid/graphics/drawable/Drawable;Z)V

    .end local v9           #icon:Landroid/graphics/drawable/Drawable;
    .local v10, icon:Landroid/graphics/drawable/Drawable;
    move-object v9, v10

    .line 278
    .end local v10           #icon:Landroid/graphics/drawable/Drawable;
    .end local v13           #newBmp:Landroid/graphics/Bitmap;
    .restart local v9       #icon:Landroid/graphics/drawable/Drawable;
    :cond_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->cachedMap:Ljava/util/Map;

    move-object/from16 v17, v0

    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v18, v0

    move-object/from16 v0, v17

    move-object/from16 v1, v18

    move-object v2, v9

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 285
    .end local v14           #old:Landroid/graphics/Bitmap;
    .end local v16           #opt:Landroid/graphics/BitmapFactory$Options;
    :cond_6
    if-nez v9, :cond_7

    .line 286
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mContext:Landroid/content/Context;

    move-object/from16 v17, v0

    move-object v0, v6

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    move-object/from16 v18, v0

    invoke-static/range {v17 .. v18}, Lcom/htc/android/footprints/utils/FootprintUtils;->getInverseCategory(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v9

    .line 289
    :cond_7
    invoke-virtual {v7, v9}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->setMarker(Landroid/graphics/drawable/Drawable;)V
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_1

    .line 290
    .end local v6           #f:Lcom/htc/android/footprints/vo/Footprint;
    :catch_0
    move-exception v17

    move-object/from16 v5, v17

    .line 291
    .local v5, error:Ljava/lang/OutOfMemoryError;
    const-string v17, "AbstractGroupableOverlay"

    invoke-virtual {v5}, Ljava/lang/OutOfMemoryError;->getMessage()Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v17

    move-object/from16 v1, v18

    move-object v2, v5

    invoke-static {v0, v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 293
    invoke-static {}, Ljava/lang/System;->gc()V

    goto/16 :goto_1

    .line 300
    .end local v5           #error:Ljava/lang/OutOfMemoryError;
    .end local v7           #gm:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v8           #i$:Ljava/util/Iterator;
    .end local v9           #icon:Landroid/graphics/drawable/Drawable;
    .end local v15           #oldCount:I
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->getGroupMapItems()Ljava/util/ArrayList;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v8

    .restart local v8       #i$:Ljava/util/Iterator;
    :goto_2
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-eqz v17, :cond_9

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 302
    .local v11, item:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mProjection:Lcom/google/android/maps/Projection;

    move-object/from16 v17, v0

    move-object v0, v11

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mPoint:Lcom/google/android/maps/GeoPoint;

    move-object/from16 v18, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    move-object/from16 v19, v0

    invoke-interface/range {v17 .. v19}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 303
    invoke-virtual {v11}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object v17

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move/from16 v18, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    iget v0, v0, Landroid/graphics/Point;->y:I

    move/from16 v19, v0

    move-object/from16 v0, p1

    move-object/from16 v1, v17

    move/from16 v2, v18

    move/from16 v3, v19

    move/from16 v4, p3

    invoke-static {v0, v1, v2, v3, v4}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->drawAt(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIZ)V

    goto :goto_2

    .line 309
    .end local v11           #item:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    :cond_9
    return-void
.end method

.method public final getItem(I)Lcom/htc/android/footprints/vo/Footprint;
    .locals 1
    .parameter "position"

    .prologue
    .line 132
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/htc/android/footprints/vo/Footprint;

    return-object p0
.end method

.method protected hitTest(Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;II)Z
    .locals 2
    .parameter "item"
    .parameter "hitX"
    .parameter "hitY"

    .prologue
    .line 219
    invoke-virtual {p1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->getTouchableBounds(Landroid/graphics/Rect;)Landroid/graphics/Rect;

    move-result-object v0

    .line 220
    .local v0, bounds:Landroid/graphics/Rect;
    invoke-virtual {v0, p2, p3}, Landroid/graphics/Rect;->contains(II)Z

    move-result v1

    return v1
.end method

.method public jump(Lcom/htc/android/footprints/vo/Footprint;Lcom/google/android/maps/MapView;)V
    .locals 6
    .parameter "footprint"
    .parameter "mapView"

    .prologue
    .line 202
    iget-object v4, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    iget-object v4, v4, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->mGroupList:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_2

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 203
    .local v1, g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getFootprints()Ljava/util/ArrayList;

    move-result-object v4

    invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v3

    .local v3, i$:Ljava/util/Iterator;
    :cond_1
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/htc/android/footprints/vo/Footprint;

    .line 204
    .local v0, f:Lcom/htc/android/footprints/vo/Footprint;
    invoke-virtual {p1, v0}, Lcom/htc/android/footprints/vo/Footprint;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 205
    invoke-virtual {v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    instance-of v4, v4, Lcom/htc/android/footprints/commonui/TBarDrawable;

    if-eqz v4, :cond_2

    .line 206
    invoke-virtual {v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/htc/android/footprints/commonui/TBarDrawable;

    const/4 v4, 0x1

    invoke-virtual {p0, v4, p2}, Lcom/htc/android/footprints/commonui/TBarDrawable;->setFocus(ZLcom/google/android/maps/MapView;)V

    .line 207
    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getController()Lcom/google/android/maps/MapController;

    move-result-object v4

    iget-object v5, v1, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->mPoint:Lcom/google/android/maps/GeoPoint;

    invoke-virtual {v4, v5}, Lcom/google/android/maps/MapController;->setCenter(Lcom/google/android/maps/GeoPoint;)V

    .line 208
    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getController()Lcom/google/android/maps/MapController;

    move-result-object v4

    const/16 v5, 0x11

    invoke-virtual {v4, v5}, Lcom/google/android/maps/MapController;->setZoom(I)I

    .line 214
    .end local v0           #f:Lcom/htc/android/footprints/vo/Footprint;
    .end local v1           #g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v3           #i$:Ljava/util/Iterator;
    :cond_2
    return-void
.end method

.method public onTap(Lcom/google/android/maps/GeoPoint;Lcom/google/android/maps/MapView;)Z
    .locals 3
    .parameter "p"
    .parameter "mapView"

    .prologue
    .line 161
    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v1

    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    invoke-interface {v1, p1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 162
    iget-object v1, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v1, v1, Landroid/graphics/Point;->x:I

    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mTempPoint:Landroid/graphics/Point;

    iget v2, v2, Landroid/graphics/Point;->y:I

    invoke-direct {p0, v1, v2, p2}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->getItemAtLocation(IILcom/google/android/maps/MapView;)Ljava/util/ArrayList;

    move-result-object v0

    .line 164
    .local v0, fList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_0

    .line 165
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->onTap([Lcom/htc/android/footprints/vo/Footprint;)Z

    move-result v1

    .line 167
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

.method protected abstract onTap([Lcom/htc/android/footprints/vo/Footprint;)Z
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;Lcom/google/android/maps/MapView;)Z
    .locals 5
    .parameter "e"
    .parameter "mapView"

    .prologue
    const/4 v4, 0x0

    .line 142
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    if-nez v2, :cond_0

    .line 143
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    float-to-int v2, v2

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v3

    float-to-int v3, v3

    invoke-direct {p0, v2, v3, p2}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->checkItemAtLocation(IILcom/google/android/maps/MapView;)Ljava/util/ArrayList;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 145
    .local v0, g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {v0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object v2

    sget-object v3, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->PRESSED_STATE_SET:[I

    invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setState([I)Z

    goto :goto_0

    .line 147
    .end local v0           #g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v1           #i$:Ljava/util/Iterator;
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    const/4 v3, 0x1

    if-eq v2, v3, :cond_1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    const/4 v3, 0x3

    if-ne v2, v3, :cond_2

    .line 149
    :cond_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    float-to-int v2, v2

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v3

    float-to-int v3, v3

    invoke-direct {p0, v2, v3, p2}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->getItemAtLocation(IILcom/google/android/maps/MapView;)Ljava/util/ArrayList;

    .line 150
    iget-object v2, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    iget-object v2, v2, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->mGroupList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .restart local v1       #i$:Ljava/util/Iterator;
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;

    .line 151
    .restart local v0       #g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    invoke-virtual {v0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;->getMarker()Landroid/graphics/drawable/Drawable;

    move-result-object v2

    new-array v3, v4, [I

    invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setState([I)Z

    goto :goto_1

    .line 156
    .end local v0           #g:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupMapItem;
    .end local v1           #i$:Ljava/util/Iterator;
    :cond_2
    return v4
.end method

.method protected final populate()V
    .locals 4

    .prologue
    .line 122
    iget-object v3, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->clear()V

    .line 123
    invoke-virtual {p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->size()I

    move-result v2

    .line 124
    .local v2, resultCount:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v2, :cond_0

    .line 125
    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->createItem(I)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v1

    .line 126
    .local v1, item:Lcom/htc/android/footprints/vo/Footprint;
    iget-object v3, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 124
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 128
    .end local v1           #item:Lcom/htc/android/footprints/vo/Footprint;
    :cond_0
    invoke-virtual {p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->changeZoom()V

    .line 129
    return-void
.end method

.method public release()V
    .locals 1

    .prologue
    .line 82
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->pHandler:Landroid/os/Handler;

    invoke-virtual {v0}, Landroid/os/Handler;->getLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Looper;->quit()V

    .line 83
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->cachedMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 84
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mItemList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 85
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    invoke-virtual {v0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->clear()V

    .line 86
    iget-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mGroupDispatcher:Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;

    iget-object v0, v0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay$GroupDispatcher;->mGroupPool:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->clear()V

    .line 87
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->mContext:Landroid/content/Context;

    .line 89
    return-void
.end method

.method protected abstract size()I
.end method
